*<(GPL, copyleft, https://www.gnu.org/licenses/gpl-3.0.de.html)>
<This code shows descriptive statistics and frequencies of the sample characteristics of study 1, 
it further compares some variables of subsample 1 and subsample 2.>
Copyright (C) <2021>  <Zehtner, R. I. & Hermann, A.>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

*This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

*You should have received a copy of the GNU General Public License
along with this program.  If not, see 
https://www.gnu.org/licenses/ <https://www.gnu.org/licenses/>


***analyses were conducted using SPSS 26 (IBM Corporation, Armonk, NY, USA)

***use file: Data_Study1_all***

***exlusion criteria and number of cases (n):
****age<18 (n=1), 
****relating the FEQ not to family of origin (n=3), 
****incorrect answer to control question (FEQ_41_control) (n=33)

***use filter with valid cases only (=filter_gueltigeFaelle)

USE ALL.
FILTER by filter_gueltigeFaelle.

***Descriptive statistics***

FREQUENCIES VARIABLES=Alter Geschlecht Bildungsabschluss
  /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN
  /ORDER=ANALYSIS.

***Subsample 1 vs. 2

USE ALL.
FILTER BY filter_gueltigeFaelle.
EXECUTE.

SORT CASES  BY Sample1.
SPLIT FILE LAYERED BY Sample1.

FREQUENCIES VARIABLES=Alter Geschlecht Beziehung_Single 
    Beziehung_festePartner Beziehung_verheiratet Beziehung_verheiratet_getrennt 
    Beziehung_geschieden Beziehung_verwitwet Bildungsabschluss
  /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN
  /ORDER=ANALYSIS.

SPLIT FILE OFF.
USE ALL.
FILTER BY filter_gueltigeFaelle.
EXECUTE.

T-TEST GROUPS=Subsample(1 2)
  /MISSING=ANALYSIS
  /VARIABLES=Alter
  /CRITERIA=CI(.95).

NPAR TESTS
  /M-W= Geschlecht BY Subsample(1 2)
  /MISSING ANALYSIS.

NPAR TESTS
  /M-W= Beziehung_Ausweichoption Beziehung_Single Beziehung_festePartner 
    Beziehung_verheiratet Beziehung_verheiratet_getrennt Beziehung_geschieden 
    Beziehung_verwitwet BY Subsample(1 2)
  /MISSING ANALYSIS.

NPAR TESTS
  /M-W= Bildungsabschluss BY Subsample(1 2)
  /MISSING ANALYSIS.